package com.ruoyi.psi.base.unit.domain;



import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * 计量单位表 psi_base_unit
 * @author Drj 2021/6/28
 */
public class BaseUnit extends BaseEntity {
    /**
     * 计量编号
     */
    @NotNull(message = "计量编号不能为空")
    @ApiModelProperty(value = "计量编号", required = true)
    @Excel(name = "计量编号")
    private String baseUnitId;
    /**
     * 计量单位
     */
    @Excel(name = "计量单位")
    private String baseUnit;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间")
    private Timestamp createTime;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    public String getBaseUnitId() {
        return baseUnitId;
    }

    public void setBaseUnitId(String baseUnitId) {
        this.baseUnitId = baseUnitId;
    }

    public String getBaseUnit() {
        return baseUnit;
    }

    public void setBaseUnit(String baseUnit) {
        this.baseUnit = baseUnit;
    }

    @Override
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BaseUnit baseUnit1 = (BaseUnit) o;
        return Objects.equals(baseUnitId, baseUnit1.baseUnitId) &&
                Objects.equals(baseUnit, baseUnit1.baseUnit) &&
                Objects.equals(createTime, baseUnit1.createTime) &&
                Objects.equals(remark, baseUnit1.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(baseUnitId, baseUnit, createTime, remark);
    }

    @Override
    public String toString() {
        return "BaseUnit{" +
                "baseUnitId='" + baseUnitId + '\'' +
                ", baseUnit='" + baseUnit + '\'' +
                ", createTime=" + createTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
